﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mfRefundInfo.aspx.cs" Inherits="msBsc.WebUi.mMall.Buyer.mfRefundInfo" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>手机地接客商城</title>
    <%=getMeta()%>
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/mGlobal.css" charset="gbk" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/css/home/base.css" charset="gbk" />
    <link href="/jqPlugin/laydate/skins/default/laydate.css" rel="stylesheet" charset="gbk" />
    <link href="/themes/mStyle1/css/public/mOrder.css" rel="stylesheet" />
    <%=getBodyBeforeJs()%>

    <script type="text/javascript" src="/jqPlugin/js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="/jqPlugin/js/jBase.js"></script>
    <script type="text/javascript" src="/jqPlugin/js/jmPage.js"></script>
    <script type="text/javascript" src="/themes/Style1/jsQt.js"></script>
    <script type="text/javascript" src="/jqPlugin/js/laytpl.js"></script>
    <script type="text/javascript" src="/themes/wStyle1/js/comm/VerifyJs.js"></script>
    <script type="themes/wStyle1/js/comm/DateInfo.js"></script>
    <script type="text/javascript">
        $(window).load(function () {
        });
        //        $(window).bind('resize', function () { _self._ResizeHandler(_self); })
        //        .bind('scroll', function () { _self._ResizeHandler(_self); });
    </script>
    <!--head fix rgn-->
    <style type="text/css">
       
    </style>
    <base target="_self" />
</head>
<body>
    <div class="viewport">
        <%=msBsc.WebUi.Code.QtHtmlGet.GetWapHeaderMenuHtml(true) %>
        <form action='#' method="post" id="J_EmailForm">
            <input type="hidden" id="orderId" />
            <div id="c_order" class="c_order">
                <div class="progress_bar">
                    <div class="pb_cell">
                        <div class="pb_sel">
                            <div class="pbl completel">
                                <span class="order_number">1</span>
                                <span>已申请退款</span>
                            </div>
                            <div class="pbr complete"></div>
                        </div>
                    </div>
                    <div class="pb_cell">
                        <div class="pb_sel">
                            <div class="pbl ongoingl">
                                <span class="order_number">2</span>
                                <span>退款处理中</span>
                            </div>
                            <div class="pbr ongoing">
                            </div>
                        </div>
                    </div>
                    <div class="pb_cell last_pb_cell">
                        <div class="pb_sel">
                            <div class="pbl undonel">
                                <span class="order_number">3</span>
                                <span>已完成</span>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="refundInfo">
                    <img class="ref_img" id="ref_img" src="/themes/mStyle1/Image/public/error.png" />
                    <span class="ref_txt" id="ref_txt"></span>
                </div>
                <div class="reason" id="reason">
                    
                </div>
            </div>

            <div id="order_bottom" class="order_bottom">
               <%-- <div class="rb_order all_order">
                    <a class="btn_submit" id="submit_order" onclick="submitOrder()">提交订单</a>
                </div>--%>
            </div>
        </form>
        <script type="text/javascript" src="/jqPlugin/laydate/laydate.js" charset="gbk"></script>
        <script src="/themes/wStyle1/js/comm/DateInfo.js"></script>
        <script type="text/javascript">
            (function () {
                $("#h_title").text("退款详情");
                $("#orderId").val(GetQueryStr("orderId"));
                setInfo();
                $.getMessageCount();
                //doto();
            })();
            function doto() {
                var opart = new jsonRow();
                opart.AddCell("orderId", $("#orderId").val());
                opart.AddCell("ACTION", "init");
                ajaxComm(opart);
            }

            function setInfo() {
                var orderStatus = GetQueryStr("orderStatus");
                if (orderStatus == 6) {
                    $("#ref_img").attr("src", "/themes/mStyle1/Image/public/SuccessItem_01.png");
                    $("#ref_txt").text("已提交退款申请");
                    $("#order_bottom").html(" <div class='rb_order all_order'><a class='btn_submit' onclick='cancelRefund()'>取消退款申请</a></div>");
                    getRefund();
                } else if (orderStatus == 7 || orderStatus == 13) {
                    $(".pbr:eq(0)").removeClass("complete").addClass("complete1");
                    $(".pbr:eq(1)").removeClass("ongoing").addClass("complete");
                    $(".pbl:eq(1)").removeClass("ongoingl").addClass("completel");
                    $(".pbl:eq(2)").removeClass("undonel").addClass("ongoingl");
                    $("#ref_img").attr("src", "/themes/mStyle1/Image/public/SuccessItem_01.png");
                    $("#ref_txt").text("已退款");
                    $("#order_bottom").html(" <div class='rb_order all_order'><a class='btn_submit' href='/mb_OrderInfo.htm?orderId=" + $("#orderId").val() + "'>返回订单</a></div>");
                    setReason("");
                } else if (orderStatus == 10) {
                    $(".pbr:eq(0)").removeClass("complete").addClass("complete1");
                    $(".pbr:eq(1)").removeClass("ongoing").addClass("complete");
                    $(".pbl:eq(1)").removeClass("ongoingl").addClass("completel");
                    $(".pbl:eq(2)").removeClass("undonel").addClass("ongoingl");
                    $("#ref_img").attr("src", "/themes/mStyle1/Image/public/SuccessItem_01.png");
                    $("#ref_txt").text("已取消退款申请");
                    $("#order_bottom").html(" <div class='rb_order all_order'><a class='btn_submit' href='/mb_OrderInfo.htm?orderId=" + $("#orderId").val() + "'>返回订单</a></div>");
                    setReason("");
                } else if (orderStatus == 11) {
                    $("#ref_img").attr("src", "/themes/mStyle1/Image/public/error.png");
                    $("#ref_txt").text("商家拒绝退款");
                    $("#order_bottom").html(" <div class='lb_order order_ref'><a class='btn_submit' href='/mb_OrderInfo.htm?orderId=" + $("#orderId").val() + "' style='background:#faa61a;'>返回订单</a></div><div class='rb_order order_ref_r'><a class='btn_submit' href='/mb_Refund.htm?orderId=" + $("#orderId").val() + "'>重新申请</a></div>");
                    getRefund();
                }
            }

            function setReason(data) {
                var orderStatus = GetQueryStr("orderStatus");
                if (orderStatus == 6) {
                    $("#reason").text("原因：" + data.rows[0].REFUND_RECORD_EXPANATION);
                } else if (orderStatus == 7 || orderStatus == 13) {
                    $("#reason").text("欢迎下次光临");
                } else if (orderStatus == 10) {
                    $("#reason").text("欢迎下次光临");
                } else if (orderStatus == 11) {
                    $("#reason").text("原因：" + data.rows[0].REFUND_RMK);
                }
            }

            function getRefund() {
                var opart = new jsonRow();
                opart.AddCell("orderId", $("#orderId").val());
                opart.AddCell("ACTION", "getRefund");
                ajaxComm(opart);
            }

            function cancelRefund() {
                if (confirm("您确定要取消退款申请吗?") == false) {
                    return;
                }
                var opart = new jsonRow();
                opart.AddCell("orderId", $("#orderId").val());
                opart.AddCell("ACTION", "cancelRefund");
                ajaxComm(opart);
            }
            //setInfo(11);
        </script>
    </div>
</body>
<%=getBodyAfterJs() %>
</html>
